package com.ruoyi.locks;

/**
 * @Author syc
 * @Date Created in 11:34 2022/8/23
 * @Description 死锁:多个线程互相抱着对方需要的资源,然后形成僵持.
 */
public class DeadLock {



// 口红
static class Lipstick {

}

// 镜子
static class Morror{

}

static class Makeup extends Thread {
    // 需要的资源只有一份,用static来保证只有一份
   static Lipstick lipstick = new Lipstick();
   static Morror morror = new Morror();
    @Override
    public void run() {
        super.run();
    }
}

}
